package com.jetinno.utils

import java.io.Serializable

/**
 * Created by zhangyuncai.
 * Date: 2022/10/22
 */


class MenuPayPair constructor(val cate: Cate, val payTypeName: String) : Serializable {

    companion object {
        @JvmStatic
        fun newFreePair(): MenuPayPair = MenuPayPair(Cate.FREE, Cate.FREE.payTypeName)

        @JvmStatic
        fun newRemoteFreePair(): MenuPayPair = MenuPayPair(Cate.REMOTE_FREE, Cate.REMOTE_FREE.payTypeName)

        @JvmStatic
        fun newQrcodePair(payTypeName: String): MenuPayPair = MenuPayPair(Cate.QRCODE, payTypeName)

        @JvmStatic
        fun newMdbcashPair(): MenuPayPair = MenuPayPair(Cate.MDBCASH, Cate.MDBCASH.payTypeName)

        @JvmStatic
        fun newRfidPair(payTypeName: String): MenuPayPair = MenuPayPair(Cate.RFID, payTypeName)

        //反扫的支付方式是由扫描时才知道的,所以这里任意给一个支付方式
        @JvmStatic
        fun newBarPair(): MenuPayPair = MenuPayPair(Cate.BAR, "wx_bar")

        @JvmStatic
        fun newVx820Pair(payTypeName: String): MenuPayPair = MenuPayPair(Cate.VX820, payTypeName)

        @JvmStatic
        fun newFacePair(): MenuPayPair = MenuPayPair(Cate.FACE, Cate.FACE.payTypeName)

        @JvmStatic
        fun newPickcodePair(): MenuPayPair = MenuPayPair(Cate.PICKCODE, Cate.PICKCODE.payTypeName)

        @JvmStatic
        fun newTianLongPair(payTypeName: String): MenuPayPair = MenuPayPair(Cate.TIANLONG, payTypeName)

        @JvmStatic
        fun newMdbcashlessPair(): MenuPayPair = MenuPayPair(Cate.MDBCASHLESS, Cate.MDBCASHLESS.payTypeName)
    }

    override fun toString(): String {
        return "MenuPayPair(cateId=${cate.cateId}, payTypeName='$payTypeName')"
    }
}

